package 数组;

public class LeetCode507_完美数 {
    public boolean checkPerfectNumber(int num) {
        int sum = 0;
        for(int i = 1; i < num; i++) {
            if(num % i == 0) {
                sum += i;
            }
        }
        return sum == num ? true :false;
    }
}
